package com.wr.repository;

import com.wr.pojo.TArticle;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author 王瑞
 * @description:
 * @date 2020/2/27  19:07
 */
public interface TArticleRepository extends JpaRepository<TArticle,Integer>, JpaSpecificationExecutor<TArticle> {

    @Query(value = "select * from `t_article` limit ?1 ,?2",nativeQuery = true)
    List<TArticle> findLimit(Integer startNo,Integer limitTotle);
}
